<?php
// No direct access to this file
defined('_JEXEC') or die('Restricted access');
 
// import Joomla modelitem library
jimport('joomla.application.component.modelitem');
 

class CouponsModelCoupons extends JModelItem
{
        protected $id;
	protected $uniqueCode;
        protected $productName;
        protected $categoryId;
        protected $productPrice;
        protected $discountPercent;
        protected $currency;
        protected $startSellingDate;
        protected $endSellingDate;
        protected $deleted;
        protected $about;
        protected $address;
        protected $target;
        
        protected $db;

        
        public function __construct()
        {
            $this->db = JFactory::getDbo();
            parent::__construct();
        }
        
        public function getCoupon($id)
        {
            $query= 'SELECT * from #__coupons';
            $this->db->setQuery($query);
            return $this->db->loadResult();
        }
}